/*  
 provide the function to log.  
 input: environment varibles, (1) LEVEL=DEBUG||WARNING||ERROE (2)LOGPATH(the log file saving path)  
 output: different level log file  
*/  
#ifndef  _LOG_H_  
#define  _LOG_H_  
  
#include <stdlib.h>  
#include <string.h>  
#include <stdio.h>  
#include <unistd.h>  
#include <sys/types.h>  
#include <sys/stat.h>  
#include <fcntl.h>  
#include <time.h>  
  
  
//define the debug level  
#define  DEBUG 5  
#define  WARNNING 4  
#define  ERROR 3  
#define  WORNNING 1  
//if return 0,means ok, !=0, means not ok.  
int mylog(char * optional_msg,char * msg, int level);     
  
#endif  

